package com.chinasoft.listener;

import com.chinasoft.ui.PlayView;

import javax.swing.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

public class StartButtonListener implements MouseListener {
    JFrame frame;

    public StartButtonListener(JFrame frame) {
        this.frame = frame;
    }
    // alt + enter

    @Override
    public void mouseClicked(MouseEvent e) {
        System.out.println("开始游戏了 ！");
        PlayView pv = new PlayView();
        // 关闭 界面
        this.frame.dispose();
    }

    @Override
    public void mousePressed(MouseEvent e) {
        // null
    }

    @Override
    public void mouseReleased(MouseEvent e) {
        // null
    }

    @Override
    public void mouseEntered(MouseEvent e) {
        // null
    }

    @Override
    public void mouseExited(MouseEvent e) {
        // null
    }  // alt + enter
}
